package com.study.tiger.thread;

import java.util.concurrent.FutureTask;

/**
 * @Author: liutingting
 * @Date: 2022/6/20 002014:37
 * @Version: 1.0
 */
public class ThreadMain {

    public static void main(String[] args) {
        getData();
    }

    public static void getData(){
        // 继承Thread类
        ThreadTest threadTest = new ThreadTest("extends Thread");
        threadTest.start();
        //实现Runnable接口
        Thread thread = new Thread(new RunnableTest("implements Runnable"));
        thread.start();
        // 实现Callable接口
        CallableTest callableTest = new CallableTest("implements Callable");
        FutureTask futureTask = new FutureTask(callableTest);
        new Thread(futureTask).start();
    }
}
